<template>
  <el-menu 
    class="ev_menu"
    v-bind="$attrs" 
    @select="handleMenuSelect"
    @open="handleMenuOpen"
    @close="handleMenuClose"
  >
    <ev-menu-item v-bind="$attrs"></ev-menu-item>
  </el-menu>
</template>
<script lang='ts' setup name="EvMenu">
import { ref, PropType } from 'vue'

const emit = defineEmits(['onMenuSelect', 'onMenuOpen', 'onMenuClose'])
const handleMenuSelect = (index) => {
    emit('onMenuSelect', index)
}
const handleMenuOpen = (index:string) => {
    emit('onMenuOpen', index)
}
const handleMenuClose = (index:string) => {
    emit('onMenuClose', index)
}
</script>
<style scoped lang='scss'>
.ev_menu{
  width: 100%;
  height: 100%;
}
</style>